<template>
  <div class="box">
    <van-nav-bar left-arrow title="面试技巧" @click-left="back"></van-nav-bar>
    <van-search @click="gosearch()" placeholder="请输入搜索关键词" />
    <div class="technicList">
      <div>
        <!-- <div class="finditem" v-for="(item, index) in list" :key="index">
          <div class="left">
            <p>{{ item.title }}</p>
            <div class="info">
              <span class="span1">2020.06.29</span>
              <span class="iconfont iconicon_liulanliang">{{ item.read }}</span>
              <span class="iconfont iconbtn_dianzan_small_nor"></span>
            </div>
          </div>
          <div class="right" v-if="item.cover">
            <img
              class="img"
              :src="`http://159.75.209.145:1337${item.cover}`"
              alt=""
            />
          </div>
        </div> -->
        <Finditem v-model="forms"></Finditem>
      </div>
    </div>
    <div class="nomore">没有更多了</div>
  </div>
</template>

<script>
import { articlesTechnic } from '@/api/find.js'
import Finditem from './components/finditem.vue'

export default {
  components: {
    Finditem
  },
  data () {
    return {
      list: [],
      forms: {
        start: 0,
        q: ''
      }
    }
  },
  created () {
    this.getData()
  },
  methods: {
    back () {
      this.$router.push('/find')
    },
    async getData () {
      const res = await articlesTechnic()
      // console.log('list:', res)
      this.list = res.data.list
      // console.log('list', this.list)
    },
    gosearch () {
      this.$router.push('/tach')
    }
  }
}
</script>

<style lang="less" scoped>
.box {
  width: 100%;
  background-color: #fff;
  .technicList {
    padding: 0 20px;
  }
  .nomore {
    margin-top: 60px;
    color: #969799;
    text-align: center;
  }
}
.finditem {
  display: flex;
  background-color: #fff;
  .left {
    flex: 2;
    height: 180px;
    .info {
      color: #a5a6ab;
      font-size: 12px;
      display: flex;
      margin-top: 45px;
      .span1 {
        flex: 4;
      }
      span {
        flex: 2;
      }
      .iconfont {
        font-size: 10px;
      }
    }
  }
  .right {
    width: 226px;
    height: 150px;
    flex: 1;
    .img {
      height: 90%;
      width: 100%;
    }
  }
}
</style>
